﻿<?php
error_reporting(0);
define('IN_QY',true);
session_start();
require("include/common.inc.php");
define('SCRIPT','ad_list');

?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>蜜圈-众晒网</title>
          <link href="/ui/css/Hui.css" rel="stylesheet" type="text/css" />
        <link href="style1.css" rel="stylesheet" type="text/css"/>
   
   <link href="/ui/plugins/swiper/swiper.min.css" rel="stylesheet" />		
        <script type="text/javascript" src="/ui/xianzhi/js/jquery.min.js"></script>
     <script src="/ui/plugins/swiper/swiper.min.js"></script>
        <script type="text/javascript" src="/ui/xianzhi/js/tab.js"></script>	
<link rel="stylesheet" type="text/css" href="/ui/pubu/css/style.css" />	
	<script src="dropload.min.js"></script>	
		
    <style type="text/css">
        #header{width:100%; position:absolute; top:0;}
        #footer{width:100%; position:absolute; bottom:0;}
        #main{width:100%; overflow: auto; position:absolute; top:44px;bottom:55px;background:white;}	
		.dropload-up,.dropload-down{
    position: relative;
    height: 0;
    overflow: hidden;
    font-size: 12px;
    /* 开启硬件加速 */
    -webkit-transform:translateZ(0);
    transform:translateZ(0);
}
.dropload-down{
    height: 50px;
}
section.aui-scrollView {
    background: #efefef;
}
.dropload-refresh,.dropload-update,.dropload-load,.dropload-noData{
    height: 50px;
    line-height: 50px;
    text-align: center;
}
.wall-column:nth-child(2n) {
    float: right;
}
.wall-column:nth-child(2n+1) {
    float: left;
}
.aui-shop-layout {
    margin-top: 15px;
}
.dropload-load .loading{
    display: inline-block;
    height: 15px;
    width: 15px;
    border-radius: 100%;
    margin: 6px;
    border: 2px solid #666;
    border-bottom-color: transparent;
    vertical-align: middle;
    -webkit-animation: rotate 0.75s linear infinite;
    animation: rotate 0.75s linear infinite;
}
span.aui-special-etc-hd {
    margin-left: 27px;
}
.icon-comment {
    width: 25px;
    height: 24px;
    background-size: 22px;
    margin-left: 34px;
    background-image: url(/ui/image/收藏黑@3x.png);
    margin-top: -2px;
}
.icon-comment2 {
	margin-left: 34px;
}
@-webkit-keyframes rotate {
    0% {
        -webkit-transform: rotate(0deg);
    }
    50% {
        -webkit-transform: rotate(180deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
    }
}
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    50% {
        transform: rotate(180deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
    </style>
</head>
<body>
    <header class="H-header H-theme-background-color-white" id="header">
    	<a href="index.php" class="aui-navBar-item" style="float: left;">
		
          <i class="icon icon-return"></i>
        </a>
        <div class="aui-center">
          蜜圈-众晒网
        </div>
    </header>

    <div id="main">
	            <section class="aui-scrollView">
	

	    <div class="H-swiper H-position-relative H-width-100-percent H-box-sizing-border-box H-overflow-scrolling" style="height:150px;">
        <div class="swiper-container  swiper-normal H-position-absolute H-width-100-percent H-height-100-percent">
            <div class="swiper-wrapper">
                <div class="swiper-slide"><img src="/ui/image/蜜圈轮播2.jpg" class="H-width-100-percent H-height-100-percent" /></div>
                <div class="swiper-slide"><img src="/ui/image/蜜圈轮播1.jpg" class="H-width-100-percent H-height-100-percent" /></div>

            </div>
            <div class="swiper-pagination"></div>
        </div>
    </div>

	
	

			    <nav class="aui-nav-box">
					   <?
		          $sql = "select * from tbl_mother_catgroy where pid=0  ORDER by id DESC ";
	            $query=mysql_query($sql);
		        while($row=mysql_fetch_array($query))
	             {	
	            ?>				
                    <a href="?one=<?=$row['id']?>" class="aui-nav-item 
					<?php if($_GET['one']==$row['id']){ ?>
					aui-nav-item-active
					    <?php } ?>
					
					
					" style="font-size: 15px;"><?=$row['name']?></a>
                <?php } ?>						
                </nav>
  
				            <div class="aui-tab" data-ydui-tab>
				        <div class="aui-item-ofl">
                        <ul class="tab-nav">
                            <li class="tab-nav1-item tab-active">
                                <a href="miquan.php?one=<?=$_GET['one']?>">
								全部
								</a>
                            </li>
							
										   <?
		          $sql = "select * from tbl_mother_catgroy where pid='".$_GET['one']."' ORDER by id DESC ";
	            $query=mysql_query($sql);
		        while($row=mysql_fetch_array($query))
	             {	
	            ?>			
                            <li class="tab-nav1-item  
							<?php if($_GET['two']==$row['id']){ ?>
							tab-active
							  <?php } ?>
							
							">
                                <a href="?one=<?=$_GET['one']?>&two=<?=$row['id']?>"><?=$row['name']?></a>
                            </li>

					     <?php } ?>			
							
                        </ul>
                    </div>
                   </div>
			

			<div class="aui-shop-layout">

<div class="wrapper">
<ul class="wall">



</ul>
</div>
				
</div>	
				
</section>
	<!--------------->	


	
    </div>

    <?include('footer.php');?>
    <script src="/ui/script/H.js" type="text/javascript"></script>
    <script src="/ui/pubu/js/jaliswall.js" type="text/javascript" charset="utf-8"></script>	
   
<script type="text/javascript">
		$(function(){
			$('.wall').jaliswall({ item: '.article' });
		});
	</script>
	
	    <script type="text/javascript">
        var swiper = new Swiper('.swiper-normal', {
            pagination: '.swiper-pagination',
            loop: true
        });
    </script>
	
	
		<script>
		
$(function(){
    // 页数
    var page = '0';
	var one='<?=$_GET['one']?>';
	//var one="";	
	var two='<?=$_GET['two']?>';
     $('.wrapper').dropload({
        scrollArea : window,
        loadDownFn : function(me){
            page++;
            // 拼接HTML
            var result = '';
            $.ajax({
                type: 'POST',
                url: 'miquanapi.php',
                dataType: 'json',
				data:{
					page:page,
					one:one,
					two:two	
				},
                success: function(data){
					
					if(data==0){
						me.lock();
                        // 无数据
                        me.noData();
						  me.resetload();
						$(".dropload-noData").empty();	
					    $(".dropload-load").empty();
					 // layer.open({
                    // content: 'end'
                   // ,skin: 'msg'
                   // ,time: 2 //2秒后自动关闭
                    // });	
					return false;	
					}
					
					   var arrLen = data.data.length;
			
                    if(arrLen > 0){

                        for(var i=0; i<arrLen; i++){
							
                            result += '<div class ="wall-column">'
							+'<div class="article">'
                     +'<a href="/wap/miquanshow.php?id='+data.data[i].id+'"">'
                   + ' <img src="'+data.data[i].img+'" />'
                    +  '<p>'+data.data[i].title+'</p>'
					
                 + ' <p class="aui-special-etc">'
                  +'<img src="'+data.data[i].tximg+'" alt="" style="width: 20px;margin-left: 0px;    border-radius: 10px; float:left">'
				+' <span style="margin-top: 5px;position: absolute;margin-left: 10px;font-size: 12px;float: right;">'+data.data[i].txname
				+'<img src="/ui/image/'+data.data[i].is_business+'.png" alt="" style="width: 10px; float:right; margin:4px 4px;">'
				+'</span>'
                   + '</p>'+'<i onclick="zan(5)" id="zan5" class="icon icon-collection1">'
       + ' <span class="aui-special-etc-hd">'+data.data[i].zan+'</span>'+'</i>'+'<i onclick="scang(5)" id="scang5" class="icon icon-comment2">'
	         + ' <span class="aui-special-etc-hd">'+data.data[i].scang+'</span>'+'</i>'
                     + ' </a>'
                       + '</div> '
					   + '</div> '

                        }
                    // 如果没有数据
                    }else{
   						alert('无搜索结果');  
						// 锁定
                        me.lock();
                        // 无数据
                        me.noData();
						

                    }
                        // 插入数据到页面，放到最后面
                        $('.wall').append(result);
                        // 每次数据插入，必须重置
                        me.resetload();
							
                
                },
                error: function(xhr, type){
					 layer.open({
                    content: '网络异常，请稍等'
                   ,skin: 'msg'
                   ,time: 2 //2秒后自动关闭
                    });	
                    me.resetload();
                }
            });
        }
    });
	
	
	
});
</script>	
	


</body>
</html>